<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"  
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets">   
  
    <h:head> 
      <f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="EmulateIE8" />
            <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
            <title>Locadora - Graph</title>
        </f:facet>
 
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/admin/css/cadastroFilme.css" /> 
      
    </h:head>  
      
    <h:body>
      
    <p:layout style="min-width:400px;min-height:200px;" id="layout" fullpage="true">  
      <p:layoutUnit position="north" size="100"  resizable="true" closable="true" collapsible="true" style="overflow:hidden;min-width:400px;min-height:160px;">  
          
    <h:form> 
          <ui:include src="layout/toolbarAdmin.xhtml" />
        <center><h:graphicImage  height="100%" value="#{resource['img:logograph_banner.png']}" /></center>
  </h:form>
      </p:layoutUnit>  
         
    <p:layoutUnit position="center" style="overflow:hidden; height:400px;" size="400" collapsible="true" >   
     <p:panel header="Cadastro de Diretor" style="width:40%;margin:0 auto;">
      <h:form style="overflow:hidden;">
         <p:growl></p:growl>
         <h:panelGrid columns="2" >
            <p:outputLabel>Nome</p:outputLabel>
            <p:inputText size="80" id="nomeDiretor"  value="#{directorBean.directorTo.name}" required="true" requiredMessage="Nome Obrigatorio">
              <f:validateLength minimum="3" />
            </p:inputText>
        <p:outputLabel>Sexo</p:outputLabel>
        
      <p:selectOneMenu id="indicador" value="#{directorBean.directorTo.gender}">
        <f:selectItem itemValue=" " itemLabel="Selecione" />
        <f:selectItem itemValue="Masculino" itemLabel="Masculino" />
        <f:selectItem itemValue="Feminino" itemLabel="Feminino" />
      </p:selectOneMenu>
       
          </h:panelGrid>
          <p:outputLabel></p:outputLabel> 
          <p:commandButton actionListener="#{directorBean.saveDirector}" value="Cadastrar"  ajax="false"></p:commandButton>
          
      </h:form> 
      </p:panel>
      </p:layoutUnit>
      
      </p:layout>
    </h:body>  
</html>  